home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
prodpack.zip
/
DB4PPSRC.EXE
/
_NODSHAK.PRG
< prev
next >
Wrap
Text File
|
1993-05-04
|
2KB
|
77 lines
*' $Header: E:/test/sysproc/doc/_nodshak.prv 1.4 27 Apr 1993 10:05:46 Bill Ramos $
FUNCTION _NodShake
PARAMETERS pc_msg
*---------------------------------------------------------------------------
* NAME
* _NodShake
*
* DESCRIPTION
* Accepts a YES/NO response from user. Returns .T. for YES and
* .F. for NO. Includes Help button. If gc_HSave is defined as
* a char type, then help is available.
*
* PARAMETERS
* pc_mssg = Dialog box message. Up to two lines of text. Use
* semi-colon to force line break. Without the semi-colon
* lines will break at the last word that fits within
* 55 characters
*
*---------------------------------------------------------------------------
DECLARE NODSHAKE[ 3 ]
*-- BT_OK - ~Yes
NODSHAKE[ 1 ] = .T.
*-- BT_CANCEL - ~No
NODSHAKE[ 2 ] = .F.
*-- BT_UHELP - ~Help
NODSHAKE[ 3 ] = .F.
FXL_Cancel = .F.
FXL_NoChng = .F.
nSemiColon = AT( ";", pc_msg )
IF nSemiColon > 0
Err_Msg1 = LEFT( pc_msg, nSemiColon - 1 )
Err_Msg2 = SUBSTR( pc_msg, nSemiColon + 1 )
ELSE
IF LEN( pc_msg ) > 55
cLine1 = LEFT( pc_msg, 55 )
nLastSpace = RAT( " ", cLine1 )
IF nLastSpace = 0
Err_Msg1 = LEFT( pc_msg, 55 )
Err_Msg2 = SUBSTR( pc_msg, 56 )
ELSE
Err_Msg1 = TRIM( LEFT( cLine1, nLastSpace - 1 ) )
Err_Msg2 = SUBSTR( cLine1, nLastSpace + 1 ) + SUBSTR( pc_msg, 56 )
ENDIF
ELSE
Err_Msg1 = pc_Msg
Err_Msg2 = ""
ENDIF
ENDIF
Err_Msg1 = HelpCTit( TRIM( Err_Msg1 ), 55 )
IF .NOT. ISBLANK( Err_Msg2 )
Err_Msg2 = HelpCTit( TRIM( Err_Msg2 ), 55 )
ENDIF
*----------------------
*-- Call the Dialog box
*----------------------
DO NodShake
IF FXL_Cancel
ll_ans = .F.
ELSE
ll_ans = .T.
ENDIF
RETURN ll_ans
*'-------------------------------------------------------------------------
*' $Log: E:/test/sysproc/doc/_nodshak.prv $
*'-------------------------------------------------------------------------